/*
 * StressTestDemo.java
 *
 * Created on April 15, 2007, 10:37 AM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package catalogueclienttest1;

import java.util.ArrayList;

/**
 *
 * @author david
 */
public class StressTestDemo {
    
    private static final int NUM_TEST_THREADS = 100;
    private static ArrayList<Thread> threads = new ArrayList<Thread>();
    
    public StressTestDemo() {
        
    }
    
    public static void main(String[] args) {
        try {
            for (int i=0; i < NUM_TEST_THREADS; i++) {
                Thread t = new Thread(new StressTestThread(i));
                threads.add(t);
            }
            // timer start
            for (Thread t : threads) {
                t.start();
            }
            // all the threads are processing...
            for (Thread t : threads) {
                t.wait();
            }
            // timer end
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    
}
